package hmvc4gwt.client.view;

import hmvc4gwt.client.controller.IController;

public abstract class AbstractView implements IView {
	
	private IController controller;
	
	private boolean terminated = false;
	
	private boolean initialized = false;
	
	/**
	 * marks the View as currently visible
	 */
	private boolean isVisible = false;

	public IController getController() {
		return controller;
	}

	public void setController(IController controller) {
		this.controller = controller;
	}

	public boolean isInitialized() {
		return initialized;
	}

	public void post() {
	}

	public void pre() {
	}

	public boolean isTerminated() {
		return terminated;
	}

	public void setTerminated(boolean b) {
		terminated = b;
	}

	public void setInitialized(boolean b) {
		initialized = b;
	}

	public boolean isVisible() {
		return isVisible;
	}

	public void setVisible(boolean isVisible) {
		this.isVisible = isVisible;
	}
}
